<script setup lang="ts">
useInitTabPageSettings();

const userStore = useUserStore();

const userName = ref('');
const depName = ref('');

const toDirectAcceptance = () => {
  router.push(RouteMap.directCustomer);
};

onMounted(() => {
  const userInfo = userStore.userInfor;

  userName.value = userInfo?.userName || '';
  depName.value = userInfo?.depName || '';
});
</script>

<template>
  <app-page>
    <view class="p-4 h-screen bg-white">
      <view class="bg-main-3 rounded-20rpx flex items-center px-4 h-136 relative overflow-hidden">
        <app-icon name="a-bianzu3" size="48rpx" multi></app-icon>
        <view class="mx-3 flex-1 color-white text-14 slh">
          <view class="font-bold">{{ userName }}</view>
          <view class="slh">{{ depName }}</view>
        </view>
        <app-icon
          class="absolute right-[-32rpx] bottom-[-58rpx]"
          name="biometric-identification1"
          size="158rpx"
          multi
        ></app-icon>
      </view>
      <view class="customer-border mt-4 h-246 relative overflow-hidden" @click="toDirectAcceptance">
        <view class="flex items-center px-3 py-4">
          <view class="bg-main-3 rounded-6rpx w-12 h-40 mr-3"></view>
          <view class="font-bold text-17">直调验收</view>
        </view>
        <app-icon
          class="absolute right-[-32rpx] bottom-[-44rpx]"
          name="bianzu"
          size="234rpx"
          multi
        ></app-icon>
      </view>
    </view>
  </app-page>
</template>
